﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TfsBacklogMgr.Main.Properties;

namespace TfsBacklogMgr.Main.Mocks
{
    public class MockWorkItemField
    {
        public MockWorkItemField()
        {
            Value = "";
        }
        public object Value { get; set; }
    }

    public class MockWorkItemFields
    {
        private Dictionary<string, MockWorkItemField> _fields;
        public MockWorkItemFields()
        {
            Settings s = Settings.Default;
            _fields = new Dictionary<string, MockWorkItemField>();
            _fields[Microsoft.TeamFoundation.WorkItemTracking.Client.CoreField.AssignedTo.ToString()] = new MockWorkItemField();
            _fields[Context.GetContext().WITF_Points] = new MockWorkItemField();
            _fields[Context.GetContext().WITF_Hours] = new MockWorkItemField();
            _fields[Context.GetContext().WITF_Remain] = new MockWorkItemField();
        }

        public MockWorkItemField this[int index]
        {
            get { return _fields[index.ToString()]; }
            set { _fields[index.ToString()] = value;  }
        }

        public MockWorkItemField this[string index]
        {
            get { return _fields[index]; }
            set { _fields[index] = value; }
        }

        public MockWorkItemField this[Microsoft.TeamFoundation.WorkItemTracking.Client.CoreField index]
        {
            get { return _fields[index.ToString()]; }
            set { _fields[index.ToString()] = value; }
        }
    }
}
